package com.cyanite.playlv2api.types;

import com.cyanite.playlv2api.util.ParcelUtils;

import android.os.Parcel;
import android.os.Parcelable;

public class TripMini implements PlayLv2Type, Parcelable {

	private String mId;
    private String mName;
    private String mPhoto;

    public TripMini() {
    }

    private TripMini(Parcel in) {
        mId = ParcelUtils.readStringFromParcel(in);
    	mName = ParcelUtils.readStringFromParcel(in);
        mPhoto = ParcelUtils.readStringFromParcel(in);
    }

    @Override
    public void writeToParcel(Parcel out, int flags) {
        ParcelUtils.writeStringToParcel(out, mId);
        ParcelUtils.writeStringToParcel(out, mName);
        ParcelUtils.writeStringToParcel(out, mPhoto);
    }

    public static final Parcelable.Creator<TripMini> CREATOR = new Parcelable.Creator<TripMini>() {
        public TripMini createFromParcel(Parcel in) {
            return new TripMini(in);
        }

        @Override
        public TripMini[] newArray(int size) {
            return new TripMini[size];
        }
    };

    public String getName() {
        return mName;
    }

    public void setName(String name) {
        mName = name;
    }

    public String getId() {
        return mId;
    }

    public void setId(String tripId) {
        mId = tripId;
    }

    public String getPhoto() {
        return mPhoto;
    }

    public void setPhoto(String photo) {
        if (photo.equals(""))    {
            mPhoto = null;
        } else {
            mPhoto = photo;
        }
    }

    @Override
    public int describeContents() {
        return 0;
    }

    public void reset() {
    }
}
